﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KMrpt31.aspx.cs" Inherits="KMrpt31" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>渠道日报表</title>
    <script src="js/extTools.js" type="text/javascript"></script>
    <style>
        .x-grid-row-over .x-grid-cell-inner
        {
            font-weight: bold;
        }
        .x-column-header-inner
        {
            background: #E7EBEF url(./images/header.png) repeat-x 0 0;
        }
    </style>
    <script>
        var areachange = function (obj) {
            //alert(obj.value);
            CompanyX.binStock(obj.value);
        }
        var saveData = function () {
            App.Hidden1.setValue(Ext.encode(App.GridPanel1.getRowsValues({ selectedOnly: false, currentPageOnly: true })));
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Neptune" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
            <Items>
                <ext:Hidden ID="FormatType" runat="server" />
                <ext:Hidden ID="Hidden1" runat="server" />
                <ext:GridPanel ID="GridPanel1" runat="server" TitleAlign="Center">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server" Layout="Container">
                            <Items>
                                <ext:Toolbar ID="Toolbar3" runat="server" Layout="ColumnLayout">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtbdate" FieldLabel="日期" />
                                        <ext:Label ID="Label1" runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txtedate" />
                                        <ext:Button ID="Button1" runat="server" Text="查询" OnDirectClick="BtnQureyUser" UI="Info"
                                            Icon="Find">
                                            <DirectEvents>
                                                <Click Timeout="90000">
                                                    <EventMask ShowMask="true" Msg="加载中...">
                                                    </EventMask>
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Component ID="Component2" runat="server" Width="1500" Padding="5">
                                        </ext:Component>
                                        <ext:TextField runat="server" FieldLabel="店铺" ID="txtshops" EmptyText="店铺编号/简称查询" />
                                        <ext:MultiCombo runat="server" ID="txtshop" FieldLabel="店铺" DisplayField="shopname" Visible="false"
                                            ValueField="shopid">
                                            <Store>
                                                <ext:Store runat="server" ID="st_stock">
                                                    <Model>
                                                        <ext:Model ID="Model6" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="shopid" />
                                                                <ext:ModelField Name="shopname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                    </Items>
                                </ext:Toolbar>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Store>
                        <ext:Store ID="Store1" runat="server" PageSize="3000" OnReadData="RefreshDataSet"
                            OnSubmitData="Store1_Submit">
                            <Model>
                                <ext:Model ID="Model2" runat="server">
                                    <Fields>
                                        <ext:ModelField Name="ShopID" Mapping="店铺ID" />
                                        <ext:ModelField Name="ShopCode" Mapping="店铺代码" />
                                        <ext:ModelField Name="ShopName" Mapping="店铺简称" />
                                        <ext:ModelField Name="InfoName" Mapping="经营性质" />
                                        <ext:ModelField Name="mj" Mapping="面积" />
                                        <ext:ModelField Name="AreaName" Mapping="区域" />
                                        <ext:ModelField Name="Province" Mapping="省份" />
                                        <ext:ModelField Name="OpenDate" Mapping="开业时间" />
                                        <ext:ModelField Name="day1" Mapping="1日" />
                                        <ext:ModelField Name="day2" Mapping="2日" />
                                        <ext:ModelField Name="day3" Mapping="3日" />
                                        <ext:ModelField Name="day4" Mapping="4日" />
                                        <ext:ModelField Name="day5" Mapping="5日" />
                                        <ext:ModelField Name="day6" Mapping="6日" />
                                        <ext:ModelField Name="day7" Mapping="7日" />
                                        <ext:ModelField Name="day8" Mapping="8日" />
                                        <ext:ModelField Name="day9" Mapping="9日" />
                                        <ext:ModelField Name="day10" Mapping="10日" />
                                        <ext:ModelField Name="day11" Mapping="11日" />
                                        <ext:ModelField Name="day12" Mapping="12日" />
                                        <ext:ModelField Name="day13" Mapping="13日" />
                                        <ext:ModelField Name="day14" Mapping="14日" />
                                        <ext:ModelField Name="day15" Mapping="15日" />
                                        <ext:ModelField Name="day16" Mapping="16日" />
                                        <ext:ModelField Name="day17" Mapping="17日" />
                                        <ext:ModelField Name="day18" Mapping="18日" />
                                        <ext:ModelField Name="day19" Mapping="19日" />
                                        <ext:ModelField Name="day20" Mapping="20日" />
                                        <ext:ModelField Name="day21" Mapping="21日" />
                                        <ext:ModelField Name="day22" Mapping="22日" />
                                        <ext:ModelField Name="day23" Mapping="23日" />
                                        <ext:ModelField Name="day24" Mapping="24日" />
                                        <ext:ModelField Name="day25" Mapping="25日" />
                                        <ext:ModelField Name="day26" Mapping="26日" />
                                        <ext:ModelField Name="day27" Mapping="27日" />
                                        <ext:ModelField Name="day28" Mapping="28日" />
                                        <ext:ModelField Name="day29" Mapping="29日" />
                                        <ext:ModelField Name="day30" Mapping="30日" />
                                        <ext:ModelField Name="day31" Mapping="31日" />
                                        <ext:ModelField Name="SaleAmt" Mapping="月度累计" />
                                        <ext:ModelField Name="kQty" Mapping="累计计客流" />
                                        <ext:ModelField Name="SaleCount" Mapping="累计单数" />
                                        <ext:ModelField Name="SaleQty" Mapping="累计件数" />
                                        <ext:ModelField Name="tbrate" Mapping="同比" />
                                        <ext:ModelField Name="hbrate" Mapping="环比" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel>
                    </ColumnModel>
                    <Features>
                        <ext:Summary ID="Summary1" runat="server">
                        </ext:Summary>
                    </Features>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                                <ext:Label ID="Label2" runat="server" Text="每页显示:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="1000" />
                                        <ext:ListItem Text="2500" />
                                        <ext:ListItem Text="3000" />
                                        <ext:ListItem Text="3500" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Value="3000" />
                                    </SelectedItems>
                                    <Listeners>
                                        <Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
                                    </Listeners>
                                </ext:ComboBox>
                                <ext:Button ID="Button2" runat="server" Text="导出Excel" Icon="PageExcel">
                                    <Listeners>
                                        <Click Handler="exportData('xls');" />
                                    </Listeners>
                                </ext:Button>
                            </Items>
                            <Plugins>
                                <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                            </Plugins>
                        </ext:PagingToolbar>
                    </BottomBar>
                    <Listeners>
                        <AfterLayout Handler="#{ToolbarDroppable1}.addDDGroup(this.child('headercontainer').reorderer.dragZone.ddGroup); doSort();"
                            Single="true" />
                    </Listeners>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
    </div>
    </form>
</body>
</html>
